/**
	@file set.S
	@author Andrew D. Zonenberg
	@brief Test of the set instructions
 */
 
.set noreorder					/*	Prevent any optimizations from reordering instructions!
									We want exe to exactly match source! */

.section .startup.bootvec, "ax", @progbits 
.globl _start
_start:
		
	li			$t0, 0xdeadbeef		/* -559,038,737		*/
	li			$t3, 0x1234
	li			$t2, 0xc0de			/* 49,374 */
	
	slt			$t7, $t0, $t2		/* t7 = 1 since -500k is less than +50k */
	slt			$t6, $t2, $t0		/* t6 = 0 since +50k is not less than -500k */
	
	sltu		$t7, $t0, $t2		/* t7 = 0 since DEADBEEF > C0DE */
	sltu		$t6, $t2, $t0		/* t6 = 1 since C0DE < DEADBEEF */
	
	slti		$t7, $t2, 0xf0de	/* t7 = 0 since 0000c0de is positive and sign-extended fffff0de is negative */
	slti		$t6, $t3, 0x2345	/* t6 = 1 since 1234 < 2345 */
	
	sltiu		$t7, $t2, 0xf0de	/* t7 = 1 since c0de is less than f0de */
	sltiu		$t6, $t2, 0x1234	/* t6 = 0 since c0de is greater than 1234 */
										
.infloop:							/*	Infinite loop
										tests j instruction */
	j			.infloop
